<template>
    <div>
        <div class="return-bar" @click="back()">
            <i class="iconfont">&#xe668;</i>
            返回结果
        </div>
        <div class="notice">
            
            <!-- <div class="title">返回结果</div> -->
            <div class="content">
                {{{ msg }}}
            </div>
        </div>

        <div class="fb_box1">

            <div class="ux_row">
                <div class="ux_flex">
                    <button class="gr_btn"  @click="back()">返回用户中心</button>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
var vm = this;
import api from '../../../data/api';
export default {
    
    data(){
        return {
            result:{
                transaction_id:'',
                result_code:'',
                download_url:'',
                viewpdf_url:'',
                timestamp:'',
                msg_digest:''
            },
            msg:''
        }
    },

    methods:{
		back(){
			this.$route.router.go('/user')
        },

        async proceed(){
            var res = await api.user.fadada_return_processor(vm.result);
            //console.log(res);
            vm.msg = res.msg;
        }
    },

	route: {
		activate ( transition ) {
			vm = this;
            document.title = "温馨提示 - 有喜财富手机版";
            vm.result = {
                transaction_id: transition.to.query.transaction_id || '',
                result_code: transition.to.query.result_code || '',
                download_url: transition.to.query.download_url || '',
                viewpdf_url: transition.to.query.viewpdf_url || '',
                timestamp: transition.to.query.timestamp || '',
                msg_digest: transition.to.query.msg_digest || ''
            };
            transition.next();
            vm.proceed();
		}
	}

}
</script>

<style lang="scss" scoped>
@import "../../../assets/sass/_mixin";
 
.notice{
    position: fixed;
    transform: translate(-50%, -50%);
    width:80%;
    top:50%;
    left: 50%;
    background-color: #fff;
    border:1px solid #b7b7b7;
    > .title{
        font-size:16px;
        color:#525252;
        padding:5px 10px;
    }

    > .content{
        padding:10px;
        font-size:16px;
    }
}
</style>

